<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>编辑</title>
</head>
<body>
    <form action="{:url('update')}" method="post">
        <input type="hidden" name="id" value="{$Klass->getData('id')}" />
        <label for="name">name:</label><input type="text" name="name" id="name" value="{$Klass->getData('name')}" />
        <label for="teacher">teacher:</label>
        <select name="teacher_id" id="teacher">
           {volist name="teachers" id="teacher"}
            <option value="{$teacher->getData('id')}" {eq name="teacher->getData('id')" value="$Klass->getData('teacher_id')"} selected="selected" {/eq}>{$teacher->getData('name')}</option>
           {/volist}
        </select>
        <button type="submit">submit</button>
    </form>
</body>
</html>